<template>
  <div class="hello">
    <h2>医药模块</h2>
    <!-- <h1>{{ msg }}</h1> -->
    <template>
         <el-table :data="msg" style="width: 100%">
           <el-table-column prop="constantCode" label="药剂别称" width="200"></el-table-column>
           <el-table-column prop="constantName" label="药剂名称" width="200"></el-table-column>
           <el-table-column prop="delMark" label="删除为0"></el-table-column>
         </el-table>
    </template>
    <el-button @click="toclick">点它</el-button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg:[{
        constantCode:'',
        constantName:'',
        delMark:''
      }]
    }
  },
  methods:{
    toclick(){
      let list = this;
      this.$axios("/neupha/phaList")
      .then(response => {
        list.msg = response.data.dosageList;
      })
      .catch()
      //使对话框新增药品，对话框消失
      //再次发送请求，进行查询
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
</style>
